package model

// StockBulletinModel 结构体
type StockBulletinModel struct {
	Id                     int        `gorm:"column:id;isNullable:NO;"`
	BulletinMainTitle      string     `gorm:"column:bulletin_main_title;comment:公告主标题;isNullable:NO;size:150;"`
	BulletinSubtitleTitle  string     `gorm:"column:bulletin_subtitle_title;comment:公告副标题;isNullable:YES;size:255;"`
	BulletinName           string     `gorm:"column:bulletin_name;comment:公告名称;isNullable:NO;size:150;"`
	BulletinGroupId        string     `gorm:"column:bulletin_group_id;comment:用户群：1,2,3;isNullable:NO;"`
	Status                 string     `gorm:"column:status;comment:状态 Y/N 正常/禁用;default:Y;isNullable:YES;size:10;"`
	BulletinType           int64      `gorm:"column:bulletin_type;comment:1：普通 2：重要 3：紧急 ;default:1;isNullable:YES;"`
	BulletinContent        string     `gorm:"column:bulletin_content;comment:公告内容;isNullable:YES;size:65535;"`
	SendType               int64      `gorm:"column:send_type;comment:1:立即发送 2：定时发送 3：重复循环发送;default:1;isNullable:YES;"`
	IntervalTime           string     `gorm:"column:interval_time;comment:发送时间间隔[单位分];isNullable:YES;"`
	NoSendStartDisturbTime string     `gorm:"column:no_send_start_disturb_time;comment:勿扰开始时间 格式：20:00;isNullable:YES;size:50;"`
	NoSendEndDisturbTime   string     `gorm:"column:no_send_end_disturb_time;comment:勿扰结束时间[跨天] 数据格式：05:56;isNullable:YES;size:50;"`
	SendStartTime          *LocalTime `gorm:"column:send_start_time;comment:发送开始时间;default:CURRENT_TIMESTAMP;isNullable:NO;"`
	SendEndTime            *LocalTime `gorm:"column:send_end_time;comment:发送结束时间;default:0000-00-00 00:00:00;isNullable:NO;"`
	CreateBy               string     `gorm:"column:create_by;comment:创建人;default:initsys;isNullable:NO;size:150;"`
	CreateTime             *LocalTime `gorm:"column:create_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
	LastUpdTime            *LocalTime `gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;isNullable:NO;"`
}

func NewStockBulletinModel() *StockBulletinModel {
	return &StockBulletinModel{}
}

// TableName StockBulletin 表名
func (a *StockBulletinModel) TableName() string {
	return "stock_bulletin"
}
